1. Field of the Invention
The present invention relates in general to a method of generating error detection codes. In particular, the present invention relates to a method of generating error detection codes for a DVD encoder.
2. Description of the Related Art
Formatting of data onto an optical disc and an error correcting process thereof are explained in FIGS. 1, 2 and 3. The error correcting process for a DVD and an ECC block are explained in FIGS. 1 and 2.
As shown in FIG. 1, information recorded on a DVD has a physical structure including a plurality of data sectors. One data sector 20 comprises, in order from the head position thereof, Identification Data (ID) 21 of a start position of the data sector 20, ID Error Detection Code (IED) 22 correcting errors of ID 21, reserve data (RSV) 23, main data 24 (i.e. the constituent data to be recorded), and an error detection code (EDC) 25 for detecting errors of ID 21, IED 22, RSV 23, and main data 24. A plurality of data sectors are arranged in sequence to constitute recording data.
Next, a process in an encoder described subsequently for creating an ECC block 30 by a plurality of data sectors is explained in FIG. 2. As shown, an ECC block including 16 data sectors is illustrated in FIG. 2. To meet the ECC format requirement, each data sector 20 are arranged to include ID 21, IED 22, RSV 23, main data 24, and EDC, while each data sector (having 2064 bytes) is further arranged in an array of 12 data rows (each containing 172 bytes). The first data row should start with three fields: ID, IED, and RSV, followed by 160-byte main data. The next 10 data rows should each contain 172-byte main data, and the last data row should contain 168-byte main data followed by a 4-byte EDC.
For each data row, a 10-byte ECC inner-code Parity (PI) 31 is generated and attached to the end of corresponding data row to constitute one correction block 34 as shown on the right side of FIG. 2. At this stage, correction blocks 34 with PI 31 attached are arranged in 12 rows along with the y-axis orientation. After that, the process is repeated with respect to 16 data sectors (for an ECC block). Accordingly, correction blocks 34 of 192 (=12×16) rows are obtained.
Thereafter, 16 ECC outer-code parities (PO) 32 are respectively generated and attached to each corresponding data columns. It is noted that PO 32 is also attached to a portion of PI 31 within the correction block 34 as shown in FIG. 2.
From the above-mentioned process, one ECC block 30 including 16 data sectors is produced as shown in the right side of FIG. 2. At this time, the total amount of information included within one ECC block 30 is expressed by:(172+10)bytes×(192+16)lines=37856 bytes
The main data 24 (i.e., other than the parity codes and sector data information ID 21, IED 22, RSV 23) therein is expressed by:2048 bytes×16=32768 bytes
An ECC block 30 shown in FIG. 2 is formed by arranging 16 data sectors in an array of 192 rows of 172 bytes each. Furthermore, a 10-byte PI is appended to each one of the 192 rows, and each one of the 182 columns includes a 16-byte PO. Thus a complete ECC block has 208 rows of 208 bytes each. Please note that the bytes of this array shown in FIG. 2 are identified as Bi,j, where the indexes i and j indicate the row number and the column number, respectively. For example, B1,0 indicates the byte at row 1 and column 0, and B190,170 indicates the byte at row 190 and column 170. Accordingly, PI 31 encompasses those bytes Bi,j identified by i=0 to 207 and j=172 to 181, while PO 32 includes the bytes Bi,j identified by i=192 to 207 and j=0 to 171.
ECC block 30 comprises both PI 31 and PO 32 as shown in the right side of FIG. 2 such that data arranged along an x-axis orientation in FIG. 2 can be corrected by PI 31 and the data arranged along the y-axis orientation can be corrected by PO 32. It is thus possible to perform error correction along both axes within the ECC block 30 shown in FIG. 2.
More concretely, if a certain correction block 34 aforementioned (each having 182 bytes in total including PI 31) is entirely destroyed by physical damage (such as by scratches), because only one byte data is lost with respect to PO 32 as viewed along the y-axis orientation, it is possible to accurately recover this byte from damage by means of error correction procedure based PO 32.
The manner of actually recording the data sectors 20 included in the ECC blocks 30 is explained in FIG. 3, wherein the bytes indicated as Bi,j corresponds to the data shown on the right side of FIG. 2. Processes at the time of recording the data sector 20 in FIG. 3 (i.e. an interleaving process and an 8-to-16 modulation process) are performed by the encoder, and are described subsequently.
When recording the ECC blocks 30 to the disk, the plurality data rows of the ECC block 30 are firstly aligned along the x-axis orientation for each correction block 34 as shown in the top stage of FIG. 3. An interleaving procedure is then performed for division into 16 recording sectors 40 (as shown in a second top stage in FIG. 3). At this time, one recording sector 40 includes 2366 bytes (=37856 bytes/16), with a data sector 20, PI 31 and PO 32 are intermingled and included in each recording sector 40. ID 21 (refer to FIG. 1) in the data sector 20, however, positions a head portion of each recording sector 40.
The recording sector 40 is divided into a plurality of segments 41 each comprising data and having 91 bytes, with a header H appended to each (as shown in a third top stage in FIG. 3). Then, one sync frame 42 is produced from one segment 41 via a 8-to-16 modulation of the recording sector 40 including the paired headers H and segments 41. At this time, one sync frame 42 is composed of a header H′ and segment 43 (as shown in a bottom stage of FIG. 3). Further, data size in one sync frame 42 is expressed by:91 bytes×8×(16/8)=1456 bytes
Data is then written to a disc in continuous sync frames 42. At this time, one recording sector 40 includes 26 sync frames 42.
Additionally, when accessing recorded data from the disk, associated 8-to-16 demodulation and de-interleaving processes (refer to FIG. 3) is performed for reproducing the recorded data. When reproducing the data to thereby reproduce the original ECC block 30 while performing the effective error correction to accurately reproduce the data.
As the description above, error detection code EDC is a 4-byte check code attached to the previous 2060 bytes (including 12-byte sector data information and 2048-byte main data) for checking error of the sector data information and the main data. Considering the data sector as a single bit field starting with the most significant bit (“MSB” as for short) of the first byte of the ID field and ending with the last significant bit (“LSB” as for short) of the last EDC field, thus the MSB will be b16511 and the LSB will be b0. Each bi of the EDC is given as following:
                                          EDC            ⁡                          (              x              )                                =                                                    ∑                                  i                  =                  31                                0                            ⁢                                                          ⁢                                                b                  i                                ⁢                                  x                  i                                                      =                                          I                ⁡                                  (                  x                  )                                            ⁢              mod              ⁢                                                          ⁢                              {                                  g                  ⁡                                      (                    x                    )                                                  }                                                    ⁢                                  ⁢        where        ⁢                                  ⁢                              I            ⁡                          (              x              )                                =                                    ∑                              i                =                32                            16511                        ⁢                                                  ⁢                                          b                i                            ⁢                              x                i                                                    ⁢                                  ⁢                              g            ⁡                          (              x              )                                =                                    x              32                        +                          x              31                        +                          x              4                        +            1                                              Equation        ⁢                                  ⁢                  (          1          )                    
FIG. 4 is a flowchart showing a conventional method for generating EDC for a data sector. First, 2048-byte main data is delivered from the host through the interface and is written into DRAM (S1). Next, 2-byte ID Error Detection code (IED) is derived for achieving the purpose of correcting 4-byte ID information errors (S2). Thereafter, 6-byte reserve data (RSV) denoting copyright is then derived. (S3), while associated sector data information ID, IED, and RSV are respectively stored into DRAM (S4). Accordingly, ID, IED, RSV, and main data may be accessed from DRAM (S5) to calculate the 4-byte error detection code (EDC) (S6).
The EDC is, however, generated by calculating ID, IED, RSV, and the main data, which are 2060 bytes totally. Obviously, DRAM bandwidth is inefficient used since an excessive amount of data is transmitted between the optical drive IC and the memory buffer (DRAM).
Therefore, the recording speed of the optical disc using conventional error detection encoding is limited by the bandwidth of the memory buffer.